package com.shareach.common;

import org.springframework.data.domain.PageRequest;

/**
 * 
 * @author zuoshuaiok@gmail.com
 * 
 */
public class PageRequestOrder extends PageRequest {

	private static final long serialVersionUID = -7689209021053294316L;

	public PageRequestOrder(int page, int size) {
		super(page, size, null);
	}

	public Integer start() {
		return (this.getPageNumber() - 1) * this.getPageSize();
	}

	public Integer end() {
		return this.getPageNumber() * this.getPageSize();

	}

}
